﻿using Oddo.Concept.Crm.Common.Presentation.Controls;

namespace Oddo.Concept.Crm.Common.Presentation.Views
{
    using System.Windows;
    using System.Windows.Controls;

    /// <summary>
    /// 
    /// </summary>
    public  partial class BaseView : UserControl
    {
        public static readonly DependencyProperty IsBusyProperty =
            DependencyProperty.Register("IsBusy", typeof (bool), typeof (BaseView), new PropertyMetadata(false));

        public static readonly DependencyProperty SearchCriteriaContentProperty =
            DependencyProperty.Register("SearchCriteriaContent", typeof(object), typeof(BaseView), new PropertyMetadata(default(object)));

        public static readonly DependencyProperty MainContentProperty =
            DependencyProperty.Register("MainContent", typeof(object), typeof(BaseView), new PropertyMetadata(default(object)));

        
        public string BusyCancelButtonText
        {
            get { return busyPanel.CancelButtonText; }
            set { busyPanel.CancelButtonText = value; }
        }

        public string BusyText
        {
            get { return busyPanel.BusyText; }
            set { busyPanel.BusyText = value; }
        }
        
        public BaseView()
        {
            this.InitializeComponent();
        }

        public bool IsBusy
        {
            get { return (bool) GetValue(IsBusyProperty); }
            set { SetValue(IsBusyProperty, value); }
        }

        public object SearchCriteriaContent
        {
            get { return (object)GetValue(SearchCriteriaContentProperty); }
            set { SetValue(SearchCriteriaContentProperty, value); }
        }


        public object MainContent
        {
            get { return (object)GetValue(MainContentProperty); }
            set { SetValue(MainContentProperty, value); }
        }


        
    }
}
